home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 18
/
018.d81
/
state matters
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
10KB
|
263 lines
0 rem ***************************** ** u.s.a. today **
1 rem ***************************** from djb shibley
2 rem
9 sp$=" ":ms$="":gosub1100
10 gosub5000:goto100
25 u=54272:pokeu+1,20:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
26 forj=1to10:next:pokeu+4,16:return
30 u=54272:pokeu+1,220:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,17
31 forj=.to10:next:pokeu+4,16:return
35 u=54272:pokeu+1,5:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,7
36 forj=1to5:next:pokeu+4,16:return
40 u=54272:pokeu+1,50:pokeu+5,9:pokeu+6,9:pokeu+24,15:pokeu+4,7
41 forj=1to5:next:pokeu+4,16:return
100 poke53265,peek(53265)and139
101 poke53280,4:poke53281,10:print"[147] [145] [145] [145] [145] [145] [145] [145] [145] [145] ";
102 gosub25
105 print" [145] [145] [145] [145] [145] [145] [145] [145] [145] [145] ";
110 forj=0to9:print" ";
115 print" ";:next
116 print" ";
120 print" [145] [145] [145] [145] [145] [145] [145] [145] ";
125 print"[145] [145] [145] [145] [145] [145] [145] [145] [145] [145] [145] ";
130 print"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]";
135 forj=1to19:print"[191] [191]";:next
140 print"[191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191][191]"
145 print"[185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185][185]"
150 print"[145] matters of state "
155 print"[162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]"
160 print"[144] "
165 print"[145] "
175 print" "
180 print"1 - what state am i ?"
185 print"2 - capitols"
190 print"3 - my neighbors are..."
195 print"4 - stop (and get scores)"
196 print"[166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":poke53265,peek(53265)or16
197 gosub25
200 printms$"[144] press option (1-4)"
205 forj=1to25:getx$:ifx$=""thennext:goto212
210 j=25:next:goto220
212 printms$sp$" "
215 forj=1to20:getx$:ifx$=""thennext:goto200
220 q=val(x$):if(q<1orq>4)andx$<>""then200
222 gosub25:ifx$=""then2000
230 onqgoto500,240,350,2000
240 print"[158] "
245 print"[145] "
250 print" "
255 s=int(rnd(.)*50+1):print"[145][145][145]"spc(20-(len(s$(s,1)))/2)s$(s,1)""
256 x1=int(rnd(.)*50+1):ifx1=sthen256
257 x2=int(rnd(.)*50+1):ifx2=sorx2=x1then257
258 x3=int(rnd(.)*50+1):ifx3=sorx3=x2orx3=x1then258
259 x4=int(rnd(.)*50+1):ifx4=sorx4=x3orx4=x2orx4=x1then259
260 x$(1)=s$(x1,3):x$(2)=s$(x2,3):x$(3)=s$(x3,3)
262 x$(4)=s$(x4,3):a=int(rnd(.)*4+1):x$(a)=s$(s,3)
270 printspc(14)""x$(1)right$(sp$,21-len(x$(1)))
275 printspc(14)""x$(2)right$(sp$,21-len(x$(2)))
280 printspc(14)""x$(3)right$(sp$,21-len(x$(3)))
285 printspc(14)""x$(4)right$(sp$,21-len(x$(4)))
290 printms$"[158]";
292 poke198,.:wait198,1:getx$:x=val(x$):ifx$<>""andx<1orx>4then292
295 ifx$=""then100
300 print" ";:ifx=athen320
305 print"wrong ":gosub35:gosub35:forj=1to1500:next:gosub35
310 w(q)=w(q)+1:goto325
320 gosub30:print"right ":r(q)=r(q)+1
325 forj=1to4:print""spc(14);:ifj=athenprint:goto330
327 printsp$
330 next:forj=1to2500:next:goto240
350 print"[156] "sp$
351 print"[145] "sp$
352 print" "sp$""
354 print" "sp$
355 print"[145] "sp$
356 print" "sp$
357 print"[145] "sp$
358 print" "sp$
359 print"[145] "sp$
360 print"return the state bordered by"
362 print"[145][159] "
370 s=int(rnd(.)*50+1):print"";
375 prints$(t(s,1),1)spc(16-len(s$(t(s,1),1)))s$(t(s,2),1)"[156]":im=35:z$=""
380 gosub800:ifx$=""then100
384 ifx$=chr$(13)thengosub850:ifck=.then380
390 ifck=1thenr(q)=r(q)+10:goto460
395 print"";:w(q)=w(q)+1
398 prints$(t(s,3),1)spc(16-len(s$(t(s,3),1)))s$(t(s,4),1):im=30
400 print"[156]":gosub800:ifx$=""thenw(q)=w(q)-1:goto100
405 ifx$=chr$(13)thengosub850:ifck=.then400
410 ifck=1thenr(q)=r(q)+9:goto460
412 print"";:w(q)=w(q)+1
415 prints$(t(s,5),1)spc(16-len(s$(t(s,5),1)))s$(t(s,6),1):im=30
417 print"[156]":gosub800:ifx$=""thenw(q)=w(q)-2:goto100
420 ifx$=chr$(13)thengosub850:ifck=.then417
424 ifck=1thenr(q)=r(q)+8:goto460
426 print"";:w(q)=w(q)+1
429 prints$(t(s,7),1)spc(16-len(s$(t(s,7),1)))s$(t(s,8),1):im=44
432 print"[156]":gosub800:ifx$=""thenw(q)=w(q)-3:goto100
435 ifx$=chr$(13)thengosub850:ifck=.then432
438 ifck=1thenr(q)=r(q)+7:goto460
440 poke53280,5:forj=1to200:next:printms$"[156] you have only seconds"
441 fork=.to9:gosub40:forj=1to30:next:next
443 poke53280,4:forj=1to200:next:printms$" "sp$ms$" "z$;
444 w(q)=w(q)+1:im=25
445 print"[156]":gosub800:
447 ifx$=chr$(13)thengosub850:ifck=.then445
448 ifck=1thenr(q)=r(q)+6:goto460
449 r(q)=r(q)+5:w(q)=w(q)+2
450 gosub35:printms$" your time is up ":forj=1to2000:next
452 gosub35:printms$" the state is: ":forj=1to1300:next:printms$sp$
453 printms$spc(16-len(s$(s,1)))s$(s,1):forj=1to2900:next:goto350
460 gosub30:ck=.:printms$sp$" "ms$" you're right":forj=1to2000:next
461 goto350
500 printms$"[145] "
505 print"[145] "
510 print" "
520 print" "sp$
521 print" "sp$
522 print"[145] "sp$
523 print" "sp$
524 print"[145] "sp$
525 print" "sp$
527 print"[145] "sp$"[145][145][145][145][145][145][145][145][145]":s=int(rnd(.)*50+1)
530 print"i begin with- "left$(s$(s,1),1):im=35:z$=""
535 print"":gosub800:ifx$=""then100
540 ifx$=chr$(13)thengosub850:ifck=.then535
545 ifck=1thenr(q)=r(q)+10:goto666
548 x=int(rnd(.)*t(s,.)+1):y=int(rnd(.)*t(s,.)+1):ify=xthen548
550 print"i border- "s$(t(s,x),1)
555 print"[145]and- "s$(t(s,y),1):im=35:w(q)=w(q)+1
560 print"":gosub800:ifx$=""thenw(q)=w(q)-1:goto100
565 ifx$=chr$(13)thengosub850:ifck=.then560
566 ifck=1thenr(q)=r(q)+9:goto666
570 print"i'm abbreviated- "s$(s,2):im=35:w(q)=w(q)+1
575 print"":gosub800:ifx$=""thenw(q)=w(q)-2:goto100
580 ifx$=chr$(13)thengosub850::ifck=.then575
584 ifck=1thenr(q)=r(q)+8:goto666
585 print"my capitol is- "s$(s,3):im=30:w(q)=w(q)+1
590 print"":gosub800:ifx$=""thenw(q)=w(q)-3:goto100
595 ifx$=chr$(13)thengosub850:ifck=.then590
599 ifck=1thenr(q)=r(q)+7:goto666
600 poke53280,5:forj=1to200:next:printms$" you have only seconds"
601 fork=.to9:gosub40:forj=1to30:next:next
602 poke53280,4:forj=1to200:next:printms$" "sp$ms$" "z$;
604 w(q)=w(q)+1:im=25
608 print"":gosub800:
610 ifx$=chr$(13)thengosub850:ifck=.then608
615 ifck=1thenr(q)=r(q)+6:goto666
620 r(q)=r(q)+5:w(q)=w(q)+2
622 gosub35:printms$" your time is up ":forj=1to2000:next:gosub35
630 printms$" the state is: ":forj=1to1300:next:printms$sp$
633 printms$spc(16-len(s$(s,1)))s$(s,1):forj=1to2900:next:goto500
666 ck=.:printms$sp$" "ms$" you're right":gosub30:forj=1to2000:next
667 goto500
799 poke788,49:stop
800 print""spc(10+len(z$));
805 print" [157]";:forj=1to30:getx$:ifx$=""thennext:im=im-1:ifim=.thenreturn
808 ifx$=""then812
810 j=30:next:goto820
812 print"[146] [157]";:forj=1to30:getx$:ifx$=""thennext:go